<?php

if (!function_exists('add_filter')){
	die('Not permitted');
}

if ( ! function_exists('gom_add_zones_cpt') ) {

	// Register Custom Post Type
	function gom_add_zones_cpt() {

		$labels = array(
				'name'                => _x( 'Zones', 'Post Type General Name', 'gom_ad_server' ),
				'singular_name'       => _x( 'Zone', 'Post Type Singular Name', 'gom_ad_server' ),
				'menu_name'           => __( 'Zones', 'gom_ad_server' ),
				'parent_item_colon'   => __( 'Parent Item:', 'gom_ad_server' ),
				'all_items'           => __( 'All zones', 'gom_ad_server' ),
				'view_item'           => __( 'View zone', 'gom_ad_server' ),
				'add_new_item'        => __( 'Add New zone', 'gom_ad_server' ),
				'add_new'             => __( 'Add New', 'gom_ad_server' ),
				'edit_item'           => __( 'Edit zone', 'gom_ad_server' ),
				'update_item'         => __( 'Update zone', 'gom_ad_server' ),
				'search_items'        => __( 'Search zone', 'gom_ad_server' ),
				'not_found'           => __( 'Not found', 'gom_ad_server' ),
				'not_found_in_trash'  => __( 'Not found in Trash', 'gom_ad_server' ),
		);
		$args = array(
				'label'               => __( 'zones', 'gom_ad_server' ),
				'description'         => __( 'Ad Zones', 'gom_ad_server' ),
				'labels'              => $labels,
				'supports'            => array( 'title', 'author', 'custom-fields', ),
				'taxonomies'          => array( 'category', 'post_tag' ),
				'hierarchical'        => false,
				'public'              => true,
				'show_ui'             => true,
				'show_in_menu'        => true,
				'show_in_nav_menus'   => true,
				'show_in_admin_bar'   => true,
				'menu_position'       => 20,
				'menu_icon'           => '',
				'can_export'          => true,
				'has_archive'         => false,
				'exclude_from_search' => true,
				'publicly_queryable'  => true,
				'capability_type'     => 'page',
		);
		register_post_type( 'zones', $args );

	}

	// Hook into the 'init' action
	add_action( 'init', 'gom_add_zones_cpt', 0 );

}

?>